kfraser@localhost.localdomain [Tue, 11 Sep 2007 07:34:04 +0000 (08:34 +0100)]
xenstore: Remove incorrect comment.
Signed-off-by: Keir Fraser <keir@xensource.com>
Alex Williamson [Mon, 10 Sep 2007 19:58:56 +0000 (13:58 -0600)]
merge with xen-unstable.hg (staging)
Alex Williamson [Mon, 10 Sep 2007 19:56:34 +0000 (13:56 -0600)]
[IA64] Use xc_map_foreign_pages() in copy_from_GFW_to_nvram()
use xc_map_foreign_pages() where possible
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Mon, 10 Sep 2007 19:52:19 +0000 (13:52 -0600)]
[IA64] Cleanup within vti code
Makes more functions/variables static.
Indentation changes to make the code easier to read.
Signed-off-by: Tristan Gingold <tgingold@free.fr>
kfraser@localhost.localdomain [Mon, 10 Sep 2007 17:09:38 +0000 (18:09 +0100)]
x86: Cleanup system restart code, and wait 10ms for APs to offline.
Signed-off-by: Joseph Cihula <joseph.cihula@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
kfraser@localhost.localdomain [Mon, 10 Sep 2007 16:49:58 +0000 (17:49 +0100)]
x86: Handle 'self-IPI' on legacy UP systems with no APIC.
Signed-off-by: Keir Fraser <keir@xensource.com>
kfraser@localhost.localdomain [Mon, 10 Sep 2007 15:51:20 +0000 (16:51 +0100)]
Change prototype of machine_restart to void machine_restart(void).
Signed-off-by: Keir Fraser <keir@xensource.com>
kfraser@localhost.localdomain [Mon, 10 Sep 2007 15:13:35 +0000 (16:13 +0100)]
vmx: Sync with SVM TPR/CR8 changes.
Signed-off-by: Keir Fraser <keir@xensource.com>
kfraser@localhost.localdomain [Mon, 10 Sep 2007 15:13:13 +0000 (16:13 +0100)]
svm: Greatly reduce total number of CR8 intercepts
This patch reduces the number of CR8 intercept to a fraction of the
number of CR8 intercepts without. First, CR8 read intercepts are
completely disabled since the SVM vTPR is kept kept in sync with the
HVM vLAPIC TPR. Second, CR8 write intercepts are enabled and disabled
based upon certain conditions. Most of the time, CR8 write intercepts
are disabled. They are enabled only when there is a pending interrupt
that can't be delivered because of either the current ISR or TPR (aka
PPR) because this is the only time the TPR matters.
With this patch, the number of CR8 intercepts dropped from around
10,000,000 to around 6,000 during boot of Windows 2003 Server 64-bit
(this is a rough estimate).
Signed-off-by: Travis Betak <travis.betak@amd.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
Tim Deegan [Mon, 10 Sep 2007 13:42:30 +0000 (14:42 +0100)]
[HVM] Add type information to the p2m map.
This is a base for memory tricks like page sharing, copy-on-write, lazy
allocation etc. It should also make pass-through MMIO easier to
implement in the p2m.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
kfraser@localhost.localdomain [Mon, 10 Sep 2007 12:59:46 +0000 (13:59 +0100)]
[libxen] Compilation fix.
On a clean system where no prior dev. version of libxen was installed,
the compilation fails due to a wrong include. This fixes it.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
kfraser@localhost.localdomain [Mon, 10 Sep 2007 12:43:19 +0000 (13:43 +0100)]
Remove dead code in acpi sleep.
Signed-off-by Kevin Tian <kevin.tian@intel.com>
kfraser@localhost.localdomain [Sat, 8 Sep 2007 09:06:15 +0000 (10:06 +0100)]
Install xen/xsm headers to .../usr/include/xen/xsm/
Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
Alex Williamson [Fri, 7 Sep 2007 19:56:50 +0000 (13:56 -0600)]
merge with xen-unstable.hg (staging)
kfraser@localhost.localdomain [Fri, 7 Sep 2007 18:54:29 +0000 (19:54 +0100)]
hvm: Fix up guest_table handling after p2m changes.
Fixes a host crash on HVM guest restore.
Signed-off-by: Keir Fraser <keir@xensource.com>
kfraser@localhost.localdomain [Fri, 7 Sep 2007 18:53:57 +0000 (19:53 +0100)]
x86/32: Fix domain_relinquish_resources().
Fixes a host crash on preempted domain_kill().
Signed-off-by: Keir Fraser <keir@xensource.com>
kfraser@localhost.localdomain [Fri, 7 Sep 2007 10:39:10 +0000 (11:39 +0100)]
xc_map_foreign_pages(), a convenient alternative to xc_map_foreign_batch()
xc_map_foreign_batch() can succeed partially. It is awkward to use
when you're only interested in complete success. Provide new
xc_map_foreign_pages() convenience function for that kind of use.
Also convert two obvious calls to use it.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
kfraser@localhost.localdomain [Fri, 7 Sep 2007 10:30:18 +0000 (11:30 +0100)]
Fix error message and wait time for xm block-detach command.
- Wait time
When xm requests a block device detach to xend, xm makes two
requests. At first, xm requests the block device detach by device
class 'vbd'. Next, xm requests the block device detaching by
device class 'tap'.
As a result, the wait time is 200 seconds because each of
the block device detaching requests causes time-out.
- Misleading error message
Because the last request is by device class 'tap' to xend,
the keyword "(tap)" is included in the error message.
This patch fixes the number of times of the block device detaching
request to one time. At first, xm makes inquiries about device
class of a detaching target device to xend. Then xm requires the
block device detaching by xend returned device class. The wait
time becomes 100 seconds because the block device detaching request
is one time. And the error message is also fixed.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
kfraser@localhost.localdomain [Fri, 7 Sep 2007 10:24:28 +0000 (11:24 +0100)]
xend: Fix error message for xm trigger command.
When I tested xm trigger command with a wrong argument, I saw the
following error message.
# xm trigger vm1 xyz
Error: __init__() takes exactly 2 arguments (3 given)
Usage: xm trigger <Domain> <nmi|reset|init> [<VCPU>]
Send a trigger to a domain.
This patch fixes the error message as follows.
# xm trigger vm1 xyz
Error: Invalid trigger: xyz
Usage: xm trigger <Domain> <nmi|reset|init> [<VCPU>]
Send a trigger to a domain.
The type of "TRIGGER_TYPE" is dictionary. domain_send_trigger()
refers to the keys of "TRIGGER_TYPE" without using keys() currently.
This patch adds keys() there.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
kfraser@localhost.localdomain [Fri, 7 Sep 2007 10:10:32 +0000 (11:10 +0100)]
xend: waitForDevices() on xm reboot.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
kfraser@localhost.localdomain [Fri, 7 Sep 2007 09:26:33 +0000 (10:26 +0100)]
Fix xenstored's dup2() usage.
The dup2() calls had their arguments reversed. Also remove the
unnecessary close() calls.
Signed-off-by: John Levon <john.levon@sun.com>
kfraser@localhost.localdomain [Fri, 7 Sep 2007 09:18:54 +0000 (10:18 +0100)]
PV-on-HVM: Fix non-SMP build warning for PV-on-HVM drivers.
smp_call_function() compiles to nothing on non-SMP, so we had a
defined-but-not-used static function.
Based on an original patch by:
Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
Signed-off-by: Robert Phillips <rphillips@virtualiron.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
kfraser@localhost.localdomain [Fri, 7 Sep 2007 08:48:35 +0000 (09:48 +0100)]
Check for libxml2 if security tools are to be built, and adapt the
python setup.py command line parameters to also work under SuSE.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
Alex Williamson [Thu, 6 Sep 2007 21:04:07 +0000 (15:04 -0600)]
[IA64] Foreign p2m: make xc_ia64_get_pfn_list() static
Now xc_ia64_get_pfn_list() isn't used anymore. Make it static.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Thu, 6 Sep 2007 21:36:13 +0000 (15:36 -0600)]
[IA64] Foreign p2m: rewrite save/restore with foreign p2m
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Thu, 6 Sep 2007 21:32:54 +0000 (15:32 -0600)]
[IA64] Foreign p2m: xc_core: ia64 xc_core_arch_gpfn_may_present()
Prevent warning message when xm dump-core
Using foreign p2m exposure, we can avoid to map the page which isn't allocated.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Thu, 6 Sep 2007 20:41:14 +0000 (14:41 -0600)]
[IA64] Foreign p2m: test module
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Thu, 6 Sep 2007 20:37:50 +0000 (14:37 -0600)]
[IA64] Foreign p2m: libxc side
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Thu, 6 Sep 2007 20:13:38 +0000 (14:13 -0600)]
[IA64] Foreign p2m: xen side
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Thu, 6 Sep 2007 19:48:43 +0000 (13:48 -0600)]
[IA64] Foreign p2m: Fix vti domain builder.
It should set arch_domain::convmem_end.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Thu, 6 Sep 2007 18:57:13 +0000 (12:57 -0600)]
[IA64] Add missing continuable destroy domain chunk
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
Alex Williamson [Thu, 6 Sep 2007 18:35:22 +0000 (12:35 -0600)]
[IA64] fix build - missing include
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Alex Williamson [Thu, 6 Sep 2007 18:05:15 +0000 (12:05 -0600)]
merge with xen-unstable.hg (staging)
kfraser@localhost.localdomain [Thu, 6 Sep 2007 17:26:45 +0000 (18:26 +0100)]
Fix domain restore after memory auto-balloon changes.
Signed-off-by: Keir Fraser <keir@xensource.com>
kfraser@localhost.localdomain [Thu, 6 Sep 2007 17:10:04 +0000 (18:10 +0100)]
Fix xm-test python import after XSM security changes.
Signed-off-by: Keir Fraser <keir@xensource.com>
kfraser@localhost.localdomain [Thu, 6 Sep 2007 17:05:18 +0000 (18:05 +0100)]
[XSM] correctly rename, relocate and patch the security.py file
This patch corrects an error in the original XSM tools patch. The
original patch did not rename, relocate and patch the security.py file
from changeset 15730:
256160ff19b7. This patch addresses this issue as
well as any updates made to security.py in xen-staging during the
merge of XSM.
Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
kfraser@localhost.localdomain [Thu, 6 Sep 2007 17:04:42 +0000 (18:04 +0100)]
[XSM] correctly located update_va_mapping hook within x86 ifdefs
The following patch addresses the issue where the XSM update_va_mapping
hook was not correctly located inside the x86 ifdefs. Included are
updates for the dummy and flask modules which are also effected by
this issue.
- update_va_mapping ifdef fix for xsm
- update_va_mapping ifdef fix for dummy module
- update_va_mapping ifdef fix for flask module
Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
Alex Williamson [Thu, 6 Sep 2007 15:05:26 +0000 (09:05 -0600)]
[IA64] Supress warning of __assign_domain_page().
On Tiger, the following memory region triggers a warning.
It seems a false-positive warning caused by c/s 13123:
90db0f68b121.
so suppress the warning in such a case.
EFI memory descriptor
(XEN) mem07: type= 5, attr=0x8000000000000009, range=[0x00000000000c0000-0x0000000000100000) (0MB)
type = EFI_RUNTIME_SERVICES_CODE
attribute = EFI_MEMORY_RUNTIME | EFI_MEMORY_WB | EFI_MEMORY_UC
from /proc/iomem
000a0000-
000fffff : PCI Bus 0000:00
000c0000-
000fffff : reserved
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Acked-by: Simon Horman <horms@verge.net.au>
kfraser@localhost.localdomain [Thu, 6 Sep 2007 10:34:38 +0000 (11:34 +0100)]
hvm: Ignore NMI deliveries for now, until hardware taskswitch is emulated.
Signed-off-by: Keir Fraser <keir@xensource.com>
kfraser@localhost.localdomain [Thu, 6 Sep 2007 10:31:02 +0000 (11:31 +0100)]
hvm: Remove hvm-specific NMI flag and use generic flag instead.
Signed-off-by: Keir Fraser <keir@xensource.com>
kfraser@localhost.localdomain [Thu, 6 Sep 2007 10:23:43 +0000 (11:23 +0100)]
Delete flask tools build target and add to .hgignore.
Signed-off-by: Keir Fraser <keir@xensource.com>
Ian Campbell [Mon, 3 Sep 2007 14:04:03 +0000 (15:04 +0100)]
Build libflask unconditionally since the python low-level tools
require it and it does't seem to pull in any major dependencies.
The alternative would have been to hack tools/python/setup.py to
conditionally compile the flask stuff.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
Ian Campbell [Mon, 3 Sep 2007 13:58:35 +0000 (14:58 +0100)]
Fix 64 bit build, cannot mix code and data declarations.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
kfraser@localhost.localdomain [Fri, 31 Aug 2007 16:00:11 +0000 (17:00 +0100)]
Implement x86 continuable domain destroy.
This patch addresses the following bug report.
http://bugzilla.xensource.com/bugzilla/show_bug.cgi?id=1037
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
kfraser@localhost.localdomain [Fri, 31 Aug 2007 15:50:26 +0000 (16:50 +0100)]
xend: Always build lowlevel security modules, as there are some
dependencies on these from with xend proper.
Signed-off-by: Keir Fraser <keir@xensource.com>
kfraser@localhost.localdomain [Fri, 31 Aug 2007 14:46:37 +0000 (15:46 +0100)]
Implement ia64 continuable domain destroy.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
kfraser@localhost.localdomain [Fri, 31 Aug 2007 14:44:38 +0000 (15:44 +0100)]
Make XEN_DOMCTL_destroydomain hypercall preemptible, in a way that is
visible to the caller (via -EAGAIN return code).
This prevents softlockup in dom0 kernel, due to the hypercall taking
too long to execute on very large (multi-multi-gigabyte) domains.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Keir Fraser <keir@xensource.com>
kfraser@localhost.localdomain [Fri, 31 Aug 2007 14:43:28 +0000 (15:43 +0100)]
libxenctrl: xc_destroy_domain() handles EAGAIN.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
kfraser@localhost.localdomain [Fri, 31 Aug 2007 13:14:14 +0000 (14:14 +0100)]
xend: Correct indexing in xc_cpu_to_node_t map.
Signed-off-by: Beth Kon <eak@us.ibm.com>
kfraser@localhost.localdomain [Fri, 31 Aug 2007 13:11:15 +0000 (14:11 +0100)]
xend: Add blktap disk type check
Print the following error when you give a wrong disk type to xm commands:
# xm create /xen/vm1.conf disk='tap:xxx:/xen/root-vm1.img,hda1,w'
Using config file "/xen/vm1.conf".
Error: tap:xxx not a valid disk type
# xm block-attach vm2 tap:yyy:/xen/second.img hdb1 w
Error: tap:yyy not a valid disk type
Usage: xm block-attach <Domain> <BackDev> <FrontDev> <Mode>
[BackDomain]
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
kfraser@localhost.localdomain [Fri, 31 Aug 2007 13:09:05 +0000 (14:09 +0100)]
Add line termination to 'echo' usage in network-bridge script.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
kfraser@localhost.localdomain [Fri, 31 Aug 2007 11:12:27 +0000 (12:12 +0100)]
Fix handling of auto-generated file xsm.py.
Signed-off-by: Keir Fraser <keir@xensource.com>
kfraser@localhost.localdomain [Fri, 31 Aug 2007 11:05:07 +0000 (12:05 +0100)]
Cleanups after XSM checkin.
Signed-off-by: Keir Fraser <keir@xensource.com>
--HG--
rename : xen/include/public/acm.h => xen/include/public/xsm/acm.h
rename : xen/include/public/acm_ops.h => xen/include/public/xsm/acm_ops.h
rename : xen/include/acm/acm_core.h => xen/include/xsm/acm/acm_core.h
rename : xen/include/acm/acm_endian.h => xen/include/xsm/acm/acm_endian.h
rename : xen/include/acm/acm_hooks.h => xen/include/xsm/acm/acm_hooks.h
kfraser@localhost.localdomain [Fri, 31 Aug 2007 10:41:49 +0000 (11:41 +0100)]
Xen Security Modules: ACM.
Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
kfraser@localhost.localdomain [Fri, 31 Aug 2007 10:37:20 +0000 (11:37 +0100)]
Xen Security Modules: Tools.
Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
kfraser@localhost.localdomain [Fri, 31 Aug 2007 10:31:18 +0000 (11:31 +0100)]
Xen Security Modules: FLASK
Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
kfraser@localhost.localdomain [Fri, 31 Aug 2007 10:21:35 +0000 (11:21 +0100)]
Xen Security Modules: XSM
Signed-off-by: George Coker <gscoker@alpha.ncsc.mil>
kfraser@localhost.localdomain [Fri, 31 Aug 2007 10:12:57 +0000 (11:12 +0100)]
DEFINE_XEN_GUEST_HANDLE is evaluated by the pre-processor twice. Do this also for XEN_GUEST_HANDLE.
This fixes a build error for PV guests (OpenBSD, NetBSD) where the use
of XEN_GUEST_HANDLE(uint8_t) leads to a build error because uint8_t is
a #define instead a typedef.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
kfraser@localhost.localdomain [Fri, 31 Aug 2007 10:10:21 +0000 (11:10 +0100)]
Fix blktap script for versions of readlink command that do not handle
regular files.
Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
Signed-off-by: Josh Nicholas <jnicholas@virtualiron.com>
Tim Deegan [Fri, 31 Aug 2007 10:06:22 +0000 (11:06 +0100)]
[HVM] Shadow: don't shadow the p2m table.
For HVM vcpus with paging disabled, we used to shadow the p2m table,
and skip the p2m lookup to go from gfn to mfn. Instead, we now
provide a simple pagetable that gives a one-to-one mapping of 4GB, and
shadow that, making the translations from gfn to mfn via the p2m.
This removes the paging-disabled special-case code from the shadow
fault handler, and allows us to expand the p2m interface, since all HVM
translations now go through the same p2m lookups.
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
Tim Deegan [Fri, 31 Aug 2007 09:59:41 +0000 (10:59 +0100)]
[XEN] Shadow: remove ununsed function shadow_convert_to_log_dirty().
Signed-off-by: Tim Deegan <Tim.Deegan@xensource.com>
kfraser@localhost.localdomain [Thu, 30 Aug 2007 17:53:54 +0000 (18:53 +0100)]
Support extensions to Intel architecture for TXT/SMX.
Signed-off-by: Joseph Cihula <joseph.cihula@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
kfraser@localhost.localdomain [Thu, 30 Aug 2007 15:41:57 +0000 (16:41 +0100)]
qemu: Allow more IDE power management.
Made the QEMU IDE disk tolerate more power-mgmt commands, specifically:
WIN_SETFEATURE(EN_AAM) - enable automatic acoustic mgmt
WIN_SETFEATURE(DIS_AAM) - disable automatic acoustic mgmt
WIN_SETFEATURE(DIS_APM) - disable automatic power mgmt
WIN_STANDBY
WIN_SETIDLE1
WIN_SLEEPNOW1
WIN_STANDBY2
WIN_SETIDLE2
WIN_SLEEPNOW2
WIN_STANDBYNOW2
These are all essentially no-ops, like existing support for EN_RLA
(enable read lookahead) and WIN_STANDBYNOW1.
This fixes a crash in the SLES9-SP3 64bit kernel when the powersaved
was started (with ACPI or ACM). This guest really only needs EN_AAM,
DIS_APM, and WIN_SETIDLE1 support, but the others seemed sensible to
include.
I've excluded EN_APM since I'm unsure of what that's agreeing to do.
It's probably ok to include.
Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
Signed-off-by: David Lively <dlively@virtualiron.com>
kfraser@localhost.localdomain [Thu, 30 Aug 2007 15:29:10 +0000 (16:29 +0100)]
blktap: Fix double-free in tapdisk cleanup.
Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
Signed-off-by: Josh Nicholas <jnicholas@virtualiron.com>
kfraser@localhost.localdomain [Thu, 30 Aug 2007 15:17:07 +0000 (16:17 +0100)]
PV-on-HVM: Define DEFINE_RWLOCK() macro for older Linux kernels.
Signed-off-by: Ben Guthro <bguthro@virtualron.com>
kfraser@localhost.localdomain [Thu, 30 Aug 2007 15:13:42 +0000 (16:13 +0100)]
PV-on-HVML: Remove extra parentheses in netif_tx_lock_bh and netif_tx_unlock_bh
macros, as it caused problems when compiling against a SLES9 tree.
Signed-off-by: Ben Guthro <bguthro@virtualiron.com>
kfraser@localhost.localdomain [Thu, 30 Aug 2007 14:39:13 +0000 (15:39 +0100)]
[ACM/XEND] Fix case where resource label file does not exist.
Fix the case where the resource label file does not exist but its
contents would be needed for access control evaluations.
Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
kfraser@localhost.localdomain [Thu, 30 Aug 2007 14:35:10 +0000 (15:35 +0100)]
qemu: Remove mapcache lock - we no longer have multiple threads in core qemu code.
Signed-off-by: Keir Fraser <keir@xensource.com>
kfraser@localhost.localdomain [Thu, 30 Aug 2007 14:00:49 +0000 (15:00 +0100)]
Update dump-core-foramt.txt documentation.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
kfraser@localhost.localdomain [Thu, 30 Aug 2007 14:00:21 +0000 (15:00 +0100)]
Introduce xc_core_arch_gpfn_may_present() hook.
On ia64 trying to map a foreign domain page which isn't allocated
cause annoying warning message. xm dump-core results in too many
warnings. With this hook, ia64 dump-core can suprress warning.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
kfraser@localhost.localdomain [Thu, 30 Aug 2007 13:58:40 +0000 (14:58 +0100)]
Optimize xc_core.c implementation.
Optimize out unnecessary map/unmap foreign domain page
by moving p2m/pfn talbe after pages array.
This patch doesn't change the xm dump-core format.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
kfraser@localhost.localdomain [Thu, 30 Aug 2007 13:57:24 +0000 (14:57 +0100)]
Some minor cleanup of xc_core.c.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
kfraser@localhost.localdomain [Thu, 30 Aug 2007 10:01:39 +0000 (11:01 +0100)]
xen: Understand the E820_UNUSABLE (type code 5) memory type.
Signed-off-by: Joseph Cihula <joseph.cihula@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
kfraser@localhost.localdomain [Thu, 30 Aug 2007 08:57:09 +0000 (09:57 +0100)]
hvm: Provide an HVMOP_flush_tlbs to flush VCPU TLBs.
From: Peter Johnston <pjohnston@xensource.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
kfraser@localhost.localdomain [Wed, 29 Aug 2007 14:47:55 +0000 (15:47 +0100)]
ioemu: Avoid unaligned guest memory accesses on ia64.
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
kfraser@localhost.localdomain [Wed, 29 Aug 2007 14:43:53 +0000 (15:43 +0100)]
Skipping image name at start of command line is an
architecture-specific action. Definitely not required on IA64, for now
make it just x86 specific.
Signed-off-by: Keir Fraser <keir@xensource.com>
kfraser@localhost.localdomain [Wed, 29 Aug 2007 14:02:41 +0000 (15:02 +0100)]
hvm: Add rombios decoding of F11/F12 scancodes in support for
Microsoft's Remote Installation Services, which require F11/F12 keys
Signed-off-by: Ben Guthro <bguthro@virtualron.com>
Signed-off-by: Steve Ofsthun <sofsthun@virtualiron.com>
kfraser@localhost.localdomain [Wed, 29 Aug 2007 14:01:57 +0000 (15:01 +0100)]
Improve commenting of xencomm_ctxt_next().
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
kfraser@localhost.localdomain [Wed, 29 Aug 2007 13:57:12 +0000 (14:57 +0100)]
hvm: Intercept reads of MSR_IA32_MCG_CAP and return 0.
This indicates no machine check "units", which agrees more closely
with Xen's super-minimal machine check architecture (just enough to
allow Windows to run). This fixes a bug that occurs when migrating a
RHEL4-64bit guest to a host with fewer machine check units than the
original host. These host physical details shouldn't be leaking
through to guests.
Signed-off-by: David Lively <dlively@virtualiron.com>
kfraser@localhost.localdomain [Wed, 29 Aug 2007 13:54:14 +0000 (14:54 +0100)]
x86: Do not #GP when guest writes unexpected values to CR4. Just
ignore them.
Signed-off-by: Keir Fraser <keir@xensource.com>
kfraser@localhost.localdomain [Wed, 29 Aug 2007 13:40:00 +0000 (14:40 +0100)]
x86: Remove (most) Centaur CPU support. Only VIA C7 can work, as it
has CMOV support. Leave a small amount of centaur.c around to support
that. MTRR code goes entirely, as 686-class Centaur CPUs have generic
MTRR support.
Signed-off-by: Keir Fraser <keir@xensource.com>
kfraser@localhost.localdomain [Wed, 29 Aug 2007 10:34:01 +0000 (11:34 +0100)]
x86: Kill Rise iDragon support.
Don't carry dead code needlessly: this is a family 5 CPU, which Xen
doesn't support. Perhaps, other CPUs' files could use some cleanup in
that respect, too, but there it would increase the delta to the Linux
origin of these files, while here the entire file can go away.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
Alex Williamson [Tue, 28 Aug 2007 18:30:31 +0000 (12:30 -0600)]
[IA64] Fixes for 4k page support.
Some code is dependent on PAGE_SIZE and shouldn't be changed.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Tue, 28 Aug 2007 18:27:39 +0000 (12:27 -0600)]
[IA64] Remove unused var opt_xenheap_megabytes
x86 and ppc use opt_xenheap_megabytes; ia64 doesn't so remove it. Also clean
up some comments; add some __init and __initdata where appropriate
Signed-off-by: Aron Griffis <aron@hp.com>
Alex Williamson [Tue, 28 Aug 2007 18:25:37 +0000 (12:25 -0600)]
[IA64] Move nvram from /usr to /var
Presently nvram is stored in /usr/lib/xen/boot/nvram_<domain> next to the guest
firmware. This violates the FHS because /usr might be mounted read-only. This
patch moves the nvram storage to /var/lib/xen/nvram/nvram_<domain>
Also clean up:
- references to stat_buf assumed that stat() had succeeded; use access()
instead since it's easier and doesn't require stat_buf at all
- nvram_path[PATH_MAX] instead of nvram_path[100]
- strncpy(..., strlen(src)) is meaningless, re-order length tests to work
correctly
Signed-off-by: Aron Griffis <aron@hp.com>
Alex Williamson [Tue, 28 Aug 2007 18:24:27 +0000 (12:24 -0600)]
[IA64] Fix parallel build; directory must exist before making symlink
Signed-off-by: Aron Griffis <aron@hp.com>
kfraser@localhost.localdomain [Tue, 28 Aug 2007 15:13:35 +0000 (16:13 +0100)]
ioemu: Avoid struct members clashing with POSIX apis
The TPM code in tools/ioemu/hw/tpm_tis.c has a struct containing a
number of function pointers with names open, close, read, write which
are the same as various POSIX apis already #included in the
file. POSIX allows these functions to be defined as macros and latest
GCC/glibc does indeed define them as macros depending on compiler
flags. This causes compile errors when deferencing the struct
members. The solution is either to change calls like ctx->open () to
be (* ctx->open) (), or simply to rename the struct members. Since
this struct was only used inside that one file I simply renamed them.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
kfraser@localhost.localdomain [Tue, 28 Aug 2007 15:11:05 +0000 (16:11 +0100)]
xm: Fix error message for xm create command.
When I tested xm create command, I saw the following error message.
I expected an error message "Error: (12, 'Cannot allocate memory')"
because I intentionally caused a memory shortage on the test.
But the error message was different from my expectation.
# xm create /xen/HVMdomain.1
Using config file "/xen/HVMdomain.1".
Error: an integer is required
I looked at xend.log to examine the cause why the error message was
shown. (Could you see the attached xend.log?)
xend had the error message "Error: (12, 'Cannot allocate memory')"
first. But xend changed the error message to "Error: an integer is
required" halfway. I'm not sure about the cause why an exception
occurred in logging processing. But when I applied an attached patch,
I confirmed that the error message that I expected was shown. The
patch does not call xc.domain_destroy_hook() if self.domid is None.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
kfraser@localhost.localdomain [Tue, 28 Aug 2007 15:08:38 +0000 (16:08 +0100)]
ioemu: error checkin when setting up the Cirrus Logic video device.
set_mm_mapping() may fail because of xc_domain_populate_physmap(). In
this case, we should not blindly go on; the xc_map_foreign_batch()
that follows will cause a page fault and, at best, get mapped in a
zeroed page from the dom0 (which is not what we want). While I'm in
here, fix a memory leak on an error path.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
kfraser@localhost.localdomain [Tue, 28 Aug 2007 15:06:32 +0000 (16:06 +0100)]
xend: Fix memory ballooning logic during save/restore. Should be same
as during domain creation.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
kfraser@localhost.localdomain [Tue, 28 Aug 2007 14:58:46 +0000 (15:58 +0100)]
Fix VNC server after HVM save/restore/migrate, when no vncpasswd specified.
The basic problem was that the "image" section of the sxp had a "None"
in it, which means that on the restore (either on the local machine or
remote machine), the vnc server in the qemu device model literally
needed the string "None" to properly connect. This simple patch only
puts a vncpasswd entry in the image if it is *not* None in the python
code, thus avoiding the whole issue.
Signed-off-by: Chris Lalancette <clalance@redhat.com>
kfraser@localhost.localdomain [Tue, 28 Aug 2007 14:44:19 +0000 (15:44 +0100)]
xencomm: Code style cleanups.
Signed-off-by: Keir Fraser <keir@xensource.com>
kfraser@localhost.localdomain [Tue, 28 Aug 2007 14:32:27 +0000 (15:32 +0100)]
[xen, xencomm] xencomm multiple page support
Current implementation doesn't allow struct xencomm_desc::address
array to be more than single page. On IA64 it causes 64GB+ domain
creation failure. This patch generalizes xencomm to allow multipage
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
kfraser@localhost.localdomain [Tue, 28 Aug 2007 14:31:56 +0000 (15:31 +0100)]
[xen, xencomm] fix various xencomm invalid racy access.
- Xencomm should check struct xencomm_desc alignment.
- Xencomm should check whether struct xencomm_desc itself (8 bytes)
doesn't cross page boundary. Otherwise a hostile guest kernel can
pass such a pointer that may across page boundary. Then xencomm
accesses an unrelated page.
- Xencomm shouldn't access struct xencomm_desc::nr_addrs multiple
times. Copy it to local area and use the copy.
Otherwise a hostile guest can modify at the same time.
- Xencomm should check whether struct xencomm_desc::address[] array
crosses page boundary. Otherwise xencomm may access unrelated pages.
- Xencomm should get_page()/put_page() after address conversion from
paddr to maddr because xen supports SMP and balloon driver.
Otherwise another vcpu may free the page at the same time.
Such a domain behaviour doesn't make sense, however nothing prevents
it.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Alex Williamson [Fri, 24 Aug 2007 21:09:14 +0000 (15:09 -0600)]
[IA64] Clean up NVRAM failure case
copy_from_GFW_to_nvram() in libxc forgot munmap() if NVRAM data
invalid. Also it forgot free() and close() too.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Alex Williamson [Fri, 24 Aug 2007 21:06:49 +0000 (15:06 -0600)]
[IA64] Kill PM timer
The release proceeding of domain resources forgot to stop (or kill)
PM timer, and freed the domain structure.
VMX flag of VCPU#0 was not set when VHPT allocation for VCPU#0
failed. For this reason, domain_relinquish_resources() did not
call vmx_relinqush_guest_resources(). But the domain structure
was freed. As a result, timer_softirq_action() lose sight of
the callback function for PM timer.
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
kfraser@localhost.localdomain [Fri, 24 Aug 2007 15:32:56 +0000 (16:32 +0100)]
hvmloader: Clarify relationship between xen_domain_handle_t and SMBIOS uuid field.
Signed-off-by: Keir Fraser <keir@xensource.com>
Keir Fraser [Fri, 24 Aug 2007 15:19:14 +0000 (16:19 +0100)]
x86: Fix paging_init() to not overwrite existing page-directory entry
for fixmap area.
Signed-off-by: Keir Fraser <keir@xensource.com>
kfraser@localhost.localdomain [Fri, 17 Aug 2007 15:48:10 +0000 (16:48 +0100)]
Merge with ia64/xen-unstable.hg
Ian Campbell [Fri, 17 Aug 2007 15:34:11 +0000 (16:34 +0100)]
silentoldconfig seems to break automated testing, try an explicit make prepare
instead.
Signed-off-by: Ian Campbell <ian.campbell@xensource.com>